package com.fy56.platform.goodsTracking.police.service.impl;

import com.dexcoder.dal.JdbcDao;
import com.dexcoder.dal.build.Criteria;
import com.fy56.platform.goodsTracking.model.PoliceSet;
import com.fy56.platform.goodsTracking.model.SysCompany;
import com.fy56.platform.goodsTracking.police.service.SysCompanyService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by XTK on 2017-03-01.
 */
@Repository
public class SysCompanyServiceImpl implements SysCompanyService{
    @Autowired
    private JdbcDao jdbcDao_upload;
    @Override
    public List<SysCompany> list(String organizationCode) {

        return jdbcDao_upload.queryListForSql("select * from Sys_Company " +
                "where OrganizationCode='"+organizationCode+"' and CompanyType in ('分公司','营业部') ",SysCompany.class);
    }
}
